local clsSwordmanAttackLight = Class("lua/game/skill/clsLight.lua"):Inherit()


------------------------------public------------------------------
------------------------------------------------------------------

function clsSwordmanAttackLight:playAttackLight(id)
	if id and type(id) == type(1) then
		--self.oAudioManager:playAudio(self.correspondingAudioIDOfAttackLightID[id])
		self:playArmature(self.attackLightTable[id])
	end
end

function clsSwordmanAttackLight:playSkillLight(id)
	if id and type(id) == type(1) then
		self:playArmature(self.skillLightTable[id])
	end
end

function getClass()
	return clsSwordmanAttackLight
end


------------------------------private-----------------------------
------------------------------------------------------------------


function clsSwordmanAttackLight:init(args)
	self.correspondingAudioIDOfAttackLightID = {
		[1] = 201,
		[2] = 202,
		[3] = 203,
		[4] = 204,
	}
	self.skillLightTable = {
		[1]	= "physical_20",
		[2] = "physical_50",
		[3] = "physical_60",
		[4] = "three_section_cut",
		[5] = "xuanfeng",
	}
	self.attackLightTable = {
		[1] = "physical_1",
		[2] = "physical_2",
		[3] = "physical_3",
		[4] = "physical_4",
	}
	self.oGameWorld = Class("lua/game/clsGameWorld.lua"):getInstance()
	--self.oAudioManager = Class("lua/game/clsAudioManager.lua"):getInstance()
	self.armatureTable = {}
	self:initArmatureTable()
	local function attackLightEvent(eventType, movementType, movementID)
		if eventType == "animationEvent" then
			if movementType == 1 then
				self:setVisible(false)
			end
		end
	end
	self.curAnimate.event = attackLightEvent
	self.curAnimate:addMovementEventCallFunc()
end

function clsSwordmanAttackLight:initArmatureTable()
	for i = 1, #self.attackLightTable do
		self.armatureTable[self.attackLightTable[i]] = self.attackLightTable[i]
	end
	for i = 1, #self.skillLightTable do
		self.armatureTable[self.skillLightTable[i]] = self.skillLightTable[i]
	end
end

